package com.iddactylogram.common.domain;

import com.iddactylogram.common.enumerate.CmdEnums;

public class MessageObject {
    private final byte cmd;
    private final String message;

    public MessageObject(byte cmd, String message) {
        this.cmd = cmd;
        this.message = message;
    }

    public byte getCmd() {
        return cmd;
    }

    public CmdEnums getCmdEnum() {
        return CmdEnums.resolve(cmd);
    }

    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return "MessageObject{" +
                "cmd=" + cmd +
                ", message='" + message + '\'' +
                '}';
    }
}
